package com.usian.wemedia.controller;

import com.usian.apis.wemedia.WmUserControllerApi;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.media.pojos.WmUser;
import com.usian.wemedia.service.WmUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author baimugudu
 * @email 2415621370@qq.com
 * @date 2023/8/24 15:20
 */
@RestController
@RequestMapping("/wmUser")
public class WmUserController implements WmUserControllerApi {
    @Autowired WmUserService wmUserService;

    @Override
    @PostMapping("/save")
    public ResponseResult saveWmUser(@RequestBody WmUser wmUser) {
        return wmUserService.saveWmUser(wmUser);
    }

    @Override
    @GetMapping("/findWmUserByName/{name}")
    public WmUser findWmUserByName(@PathVariable String name) {
        return wmUserService.findWmUserByName(name);
    }
}
